package main

import "fmt"

// 结构体 和 结构体内的 切片和MAP
type P struct {
	Name string
	Age  int
	map1 map[string]string
	qie  []string
}

func (p P) f() {
	fmt.Println("ddd")
}

func main() {
	//var p1 P

	var p1 = new(P)

	p1.Age = 12
	p1.Name = "dddd"

	p1.Name = "ffffffffffff"

	p1.f()

	p1.map1 = make(map[string]string)
	p1.map1["ddd"] = "bbbbb"

	fmt.Printf("%v", p1.map1["ddd"])

	p1.qie = make([]string, 3, 3)
	p1.qie[0] = "dddddbasdf"

	fmt.Printf("%v", p1.qie[0])
}
